<?php
/**
 *模板设置
**/
class ShoptmplsAction extends UserAction{
	public function index(){
		$db=D('Wxuser');
		$where['token']=session('token');
		$where['uid']=session('uid');
		$info=$db->where($where)->find();
		$this->assign('info',$info);
		$this->display();
	}
	public function add(){
		$gets=$this->_get('style');
		$db=M('Wxuser');
		switch($gets){
			case 1:
				$data['shoptpltypeid']=1;
				$data['shoptpltypename']='tpl_101_index';
				break;
			case 2:
				$data['shoptpltypeid']=2;
				$data['shoptpltypename']='tpl_102_index';
				break;
			case 3:
				$data['shoptpltypeid']=3;
				$data['shoptpltypename']='tpl_103_index';
				break;
			case 4:
				$data['shoptpltypeid']=4;
				$data['shoptpltypename']='tpl_104_index';
				break;
			case 5:
				$data['shoptpltypeid']=5;
				$data['shoptpltypename']='tpl_105_index';
				break;
			case 6:
				$data['shoptpltypeid']=6;
				$data['shoptpltypename']='tpl_106_index';
				break;
			case 7:
				$data['shoptpltypeid']=7;
				$data['shoptpltypename']='tpl_107_index';
				break;
			case 8:
				$data['shoptpltypeid']=8;
				$data['shoptpltypename']='tpl_108_index';
				break;
			case 9:
			    $data['shoptpltypeid']=9;
				$data['shoptpltypename']='tpl_109_index';
				break;
		}
		$where['token']=session('token');
		$db->where($where)->save($data);
	}
	public function lists(){
		$gets=$this->_get('style');
		$db=M('Admin_user');
		switch($gets){
			case 1:
				$data['shoptpllistid']=1;
				$data['shoptpllistname']='cats_list_1';
				break;
		    case 2:
				$data['shoptpllistid']=2;
				$data['shoptpllistname']='cats_list_2';
				break;
			case 3:
				$data['shoptpllistid']=3;
				$data['shoptpllistname']='cats_list_3';
				break;
			case 4:
				$data['shoptpllistid']=4;
				$data['shoptpllistname']='cats_list_4';
				break;
			case 5:
				$data['shoptpllistid']=5;
				$data['shoptpllistname']='cats_list_5';
				break;
			case 6:
				$data['shoptpllistid']=6;
				$data['shoptpllistname']='cats_list_6';
				break;
		}
		$where['token']=session('token');
		$db->where($where)->save($data);
	}
	public function content(){
		$gets=$this->_get('style');
		$db=M('Wxuser');
		switch($gets){
			case 1:
				$data['shoptpllist2id']=1;
				$data['shoptpllist2name']='products_list_1';
				break;
			case 2:
				$data['shoptpllist2id']=2;
				$data['shoptpllist2name']='products_list_2';
				break;
			case 3:
				$data['shoptpllist2id']=3;
				$data['shoptpllist2name']='products_list_3';
				break;
			case 4:
				$data['shoptpllist2id']=4;
				$data['shoptpllist2name']='products_list_4';
				break;
		}
		$where['token']=session('token');
		$db->where($where)->save($data);
	}
	public function insert(){
	
	}
	public function upsave(){
	
	}
}
?>